This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
~Anita Bubnikonyoden 2.Jan.04 07:08 PM a Web browser Applications Development6.5; 6.0.2 CF2; 6.0.2 CF1; 6.0.2; 6.0.1 CF3; 6.0.1 CF2; 6.0.1 CF1; 6.0.1; 6.0Windows 2000; Windows XP
Hello,
Using the new NotesRichTextNavigator class, get a bit of text inserted into a section.
Problem is that text gets inserted outside the section, almost as if the methods like FindFirstElement are not positioning the insertion point correctly.
Any help appreciated.
code snippet:
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set rti = doc.GetFirstItem("Body")
Set rtnav = rti.CreateNavigator
If rtnav.FindFirstElement(RTELEM_TYPE_SECTION) Then
Messagebox "Found Section in Body",, "Section"
Call rti.AddNewLine(1)
Call rti.AppendText("Appended Text after Find")
Call doc.Save(True, True)
Set rts = rtnav.GetElement
rts.IsExpanded = True
Call rti.AddNewLine(1)
Call rti.AppendText("Appended Text after expand")
Call doc.Save(True, True)
' This part fails "Element or Navigator is invalid"
' Call rtnav.SetPosition(rts)
' Call rti.AddNewLine(1)
' Call rti.AppendText("Appended Text after SetPosition")
' Call doc.Save(True, True)
' However, rts seems fine for this call
Call rtnav.SetPositionAtEnd(rts)
Call rti.AddNewLine(1)
Call rti.AppendText("Appended Text after SetPositionAtEnd")
Call doc.Save(True, True)